<?php

declare(strict_types=1);

namespace App\Controller;

use App\Model\data\CurrentShopData;
use Hyperf\DbConnection\Db;
use Hyperf\Utils\Context;
use Psr\Http\Message\ServerRequestInterface;

class IndexController extends AbstractController
{
    public function index()
    {
        var_dump(Context::get(ServerRequestInterface::class)->getAttribute("current_shop"));
        $user = $this->request->input('user', 'Hyperf');
        $method = $this->request->getMethod();
//        Db::table("dd")->paginate($this->getPageSize(),['*'],$this->getPagerName(),$this->getPager());
        return [
            'method' => Context::get(ServerRequestInterface::class)->getAttribute("current_shop"),
            'message' => "CurrentShopData::getData()",
        ];
    }
}
